Skip to content

feat(logger): docs and runtime#16437

Merged
ematipico merged 11 commits intofeat/loggerfrom
feat/logger-docs
Apr 24, 2026
Merged

feat(logger): docs and runtime#16437
ematipico merged 11 commits intofeat/loggerfrom
feat/logger-docs

Conversation

@ematipico
Copy link
Copy Markdown
Member

@ematipico ematipico commented Apr 21, 2026

Changes

This PR add documentation to the public APIs of the logger. I also adds runtime APIs.

  • Documented the logHandlers functions, and added missing configuration
  • Added Astro.logger with info, warn and error
  • Added a small flag to the manifest, just for logging and while the flag is experimental

Closes AST-82

After speaking with Matthew, we agreed to remove the the vite dev server. The commit d0d4df7 (this PR) removes it and the importing of the logger is way simpler now.

I tested it manually, specially compose.

Testing

Green CI. Added new tests.

Docs

/cc @withastro/maintainers-docs for feedback!

Added changeset, and docs to the public APIs

withastro/docs#13787

@github-actions github-actions Bot added pkg: astro Related to the core `astro` package (scope) docs pr labels Apr 21, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 21, 2026

🦋 Changeset detected

Latest commit: f40f166

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the semver: minor Change triggers a `minor` release label Apr 21, 2026
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

@ematipico ematipico marked this pull request as ready for review April 21, 2026 14:25
@ematipico ematipico changed the title refactor(cloudflare): migrate tests to typescript (#16378) feat(logger): docs and runtime Apr 21, 2026
Copy link
Copy Markdown
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Ema, the feature looks nice!

I hope I didn't got that wrong but, this is the changeset for when feat/logger will be merged in next, right? If not you can probably ignore most of my suggestions. 😅

Otherwise, I suggested a few changes to reuse the same pattern described in AD² and that we had on the previous features.

Do we need a next branch in docs or is it too early? Because it looks like we'll need a new experimental feature page for this!

Comment thread packages/astro/src/types/public/config.ts Outdated
Comment thread .changeset/silver-berries-send.md Outdated
Comment thread .changeset/silver-berries-send.md Outdated
Comment thread .changeset/silver-berries-send.md
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
@ematipico
Copy link
Copy Markdown
Member Author

I hope I didn't got that wrong but, this is the changeset for when feat/logger will be merged in next, right? If not you can probably ignore most of my suggestions. 😅

No, it will be merge into main, in the next minor version of Astro. I need to send a docs PR

Comment thread packages/astro/src/core/logger/impls/json.ts Outdated
Copy link
Copy Markdown
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I left a suggestion to add links to the docs and the RFC in the changeset. And I noticed we don't mention compose in the docs, we probably should.

Comment thread .changeset/silver-berries-send.md
Comment thread packages/astro/src/core/logger/core.ts Outdated
Comment on lines +3 to +5
/**
*
*/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Is this empty comment expected or you forgot to put something here?

* })
* ```
*/
compose(...loggers: LoggerHandlerConfig[]): LoggerHandlerConfig {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe neither the documentation nor the changeset mentions this feature. Maybe for the changeset it's not important (ie. we can focus on the most important parts) but we probably want to mention it in the docs.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it out in purpose here, I forgot to add to the docs, I will address this shortly

ematipico and others added 2 commits April 24, 2026 13:18
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
@ematipico ematipico merged commit 91cf6b8 into feat/logger Apr 24, 2026
10 checks passed
@ematipico ematipico deleted the feat/logger-docs branch April 24, 2026 12:39
ematipico added a commit that referenced this pull request Apr 24, 2026
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs pr pkg: astro Related to the core `astro` package (scope) semver: minor Change triggers a `minor` release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants